wayland: Invalidate our gtk_surface when we're unmapped
authorRui Matos <tiagomatos@gmail.com>
Sat, 1 Aug 2015 15:08:30 +0000 (17:08 +0200)
committerRui Matos <tiagomatos@gmail.com>
Mon, 3 Aug 2015 12:24:36 +0000 (14:24 +0200)
Otherwise if we get mapped again we'll try to use an invalid
gtk_surface and the compositor will disconnect us.

https://bugzilla.gnome.org/show_bug.cgi?id=753138

gdk/wayland/gdkwindow-wayland.c

index deda19434174508dbd86556ffbd139566cf5b3e2..fd02480ed080e110e76686accde3f09e0c8af872 100644 (file)
@@ -1349,6 +1349,12 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
           _gdk_frame_clock_thaw (gdk_window_get_frame_clock (window));
         }
 
+      if (impl->gtk_surface)
+        {
+          gtk_surface_destroy (impl->gtk_surface);
+          impl->gtk_surface = NULL;
+        }
+
       wl_surface_destroy (impl->surface);
       impl->surface = NULL;